package pojo;

import java.io.Serializable;
import lombok.Data;

/**
 * courseGrade
 * @author 
 */
@Data
public class CourseGrade implements Serializable {
    private Long coursegradeid;

    private Double dailywork;

    private Double midexamresults;

    private Double examresults;

    private Double totalmark;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CourseGrade other = (CourseGrade) that;
        return (this.getCoursegradeid() == null ? other.getCoursegradeid() == null : this.getCoursegradeid().equals(other.getCoursegradeid()))
            && (this.getDailywork() == null ? other.getDailywork() == null : this.getDailywork().equals(other.getDailywork()))
            && (this.getMidexamresults() == null ? other.getMidexamresults() == null : this.getMidexamresults().equals(other.getMidexamresults()))
            && (this.getExamresults() == null ? other.getExamresults() == null : this.getExamresults().equals(other.getExamresults()))
            && (this.getTotalmark() == null ? other.getTotalmark() == null : this.getTotalmark().equals(other.getTotalmark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCoursegradeid() == null) ? 0 : getCoursegradeid().hashCode());
        result = prime * result + ((getDailywork() == null) ? 0 : getDailywork().hashCode());
        result = prime * result + ((getMidexamresults() == null) ? 0 : getMidexamresults().hashCode());
        result = prime * result + ((getExamresults() == null) ? 0 : getExamresults().hashCode());
        result = prime * result + ((getTotalmark() == null) ? 0 : getTotalmark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", coursegradeid=").append(coursegradeid);
        sb.append(", dailywork=").append(dailywork);
        sb.append(", midexamresults=").append(midexamresults);
        sb.append(", examresults=").append(examresults);
        sb.append(", totalmark=").append(totalmark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}